<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="../skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>


<link href="skin/modal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/js/jqModal.js"></script>
<script type="text/javascript" src="{$M[url]}images/js/space.js"></script>
</head>
<body>

{template 'header.html'}

<style>
	.group ul .item{
		/*border:0;*/
		padding:0 0 20px 0;
		margin:20px 0 0 0;
		height:auto; overflow:hidden;
		width:290px;
		height:160px;
		float:left; display:inline;
	}
	.group ul .item p{
		margin:0; padding:0;
	}
	.group ul .item .thumb{
		float:left;
		display:inline;
	}
	.group ul .item .thumb img{ /*width:150px; height:200px;*/
	}
	.group ul .item .desc{
		width:180px;
		float:left; display:inline; margin:0 0 0 20px;
	}
	.group .item dl{
		clear:both; margin:10px 0 0 0;
	}
	
	.topic{}
</style>

<div class="container">
	
     
    <div class="main"> 
    	
        <div class="mod">
        	<div class="head">
            	发现小组 
            </div>
            <div class="body group">
            
            	<div class="well">
                	{php $query = $db->query("select userid from table_group")}
                    <h3>已有{php echo $db->num_rows($query)}个兴趣小组</h3>
                	<a href="{url("?module=$module&action=$action")}" class="button"><i class="icon-refresh"></i>换一组</a>
                </div>
            	 <ul>
                {get sql="select url,title,thumb,groupid,description from table_group order by rand() desc" rows="20"}
                      {php $keywords = explode(',',$r[keywords]);}   
                        <li class="item"> 
                            <div class="thumb">
                                <a href="{url($r[url])}">
                                 <img src="{php echo $r[thumb] ? thumb($r[thumb],72,'72') : thumb('misc/nopic.gif',72,'72')}" width="72" height="72"/>  
                                </a>
                            </div>
                            <div class="desc">
                                <strong><a href="{url($r[url])}">{$r[title]}</a> &nbsp;&nbsp;{rand(30,300)}个成员</strong>
                               <p>时间：2012-3-21 0:29:00</p>
                               <div>{str_cut($r[description],36)} <a href="./index.php?module=group&action=join&groupid={$r[groupid]}" rel="nofollow">立即加入</a></div> 
                               
                            </div>
                            
                      </li>
                      {/get}
            	</ul>
            </div>
        </div>
  		
    
  </div>
    
    
    <div class="aside">
    	
       
        <div class="mod">
            <div class="head">最近活跃</div>
            <ul class="body users">
            {get sql="select url,title,thumb from table_group where thumb <> '' order by updatetime desc" rows="8"}
            <li>
             <a href="{url($r[url])}" title="{$r[title]}">
             <img src="{php echo $r[thumb] ? thumb($r[thumb],72,'') : thumb('misc/nopic.gif',72,'')}" 
             alt="{$r[title]}"  target="_blank" width="40" height="40"/></a>
             <br/><a href="{url($r[url])}">{str_cut($r[title],15,'')}</a><br/>&nbsp;({rand(100,500)})
            </li>
          {/get}
          </ul>
        </div>
        
      
    </div>
    
</div>


{template 'footer.html'}
